package org.proddevplm.helpers;

import com.thoughtworks.xstream.XStream;
import java.io.InputStream;


public class SerializationUtil {

    private static XStream xstream = new XStream();

    static {
        xstream.autodetectAnnotations(true);
    }

    public static String serializeObject(Object objectToSerialize) {
        return xstream.toXML(objectToSerialize);
    }

    public static Object deserializeFromInputStream(InputStream stream) {
        return xstream.fromXML(stream);
    }

}
